function getSum(...args){
  return args.reduce((preValue,currentValue)=>preValue + currentValue,0);
}
console.log(getSum(1,2,3,4,5,6));//21